import { API } from 'utils/config.js'
import HTTP from 'utils/http'

export default class IndexModel extends HTTP {
  getCourseDatas() {
    return new Promise(resolve => {
      this.ajax({
        url: API.getCourseDatas,
        type: 'get',
        dataType: 'jsonp',
        jsonpCallback: 'callback',
        success(data) {
          resolve(data)
        }
      })
    })
  }
}